﻿//===============================================================================
// Microsoft patterns & practices Enterprise Library Contribution
// Query Application Block
//===============================================================================

using System.Management.Instrumentation;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Manageability;

namespace EntLibContrib.Query.Configuration.Manageability.Commands
{
	/// <summary>
	/// Represents the configuration information for an instance of
	/// <see cref="EntLibContrib.Query.Configuration.CustomCommandData"/>.
	/// </summary>
	/// <seealso cref="NamedConfigurationSetting"/>
	/// <seealso cref="ConfigurationSetting"/>
	[ManagementEntity]
	public abstract class CustomCommandSetting : NamedConfigurationSetting
	{
		#region Fields
		private string commandTypeName;
		#endregion

		#region Properties
		/// <summary>
		/// Gets or sets the name of the class type of the command.
		/// </summary>
		/// <value>The name of the command class type.</value>
		[ManagementConfiguration]
		public string CommandTypeName
		{
			get { return commandTypeName; }
			set { commandTypeName = value; }
		}
		#endregion

		#region Construction
		/// <summary>
		/// Initializes a new instance of the <see cref="CustomCommandSetting"/> class.
		/// </summary>
		/// <param name="sourceElement">The source element.</param>
		/// <param name="name">The name.</param>
		/// <param name="commandTypeName">Name of the command type.</param>
		protected CustomCommandSetting(CustomCommandData sourceElement, string name, string commandTypeName)
			: base(sourceElement, name)
		{
			this.commandTypeName = commandTypeName;
		}
		#endregion
	}
}
